<% unless @attachments.empty? %>
<ul class="attachment_list">
<% @attachments.each do |p| %>
<li id="<%= p.id %>" class="attachment_list">
   <%if params[ :media ] == 'print'%> 
	<div class="thumbs">
    Insert:
		    <br/>
		    <%= link_to "Detail", p.image.url( :detail_preview ), :onclick => "select_thumb(this);return false;"%>
		    <br/>
		    <%= link_to "Large", p.image.url( :large_thumb ), :onclick => "select_thumb(this);return false;"%>
		    <br/>
		    <%= link_to "medium", p.image.url( :medium_thumb ), :onclick => "select_thumb(this);return false;"%>
		    <br/>
		    <%= link_to "Small", p.image.url( :small_thumb ), :onclick => "select_thumb(this);return false;"%>
		    <br/>
		    <%#= link_to 'Delete', delete_attachments_path(@channel.brand_name, params[:feature], :id => p.id, :media => 'print' ), :onclick => "delete_attachment(this);"%>
		    <br/>
		    <%= link_to 'Cancel', 'javascript:void(0)', :onclick => "cancel_image();return false;"%>
	  </div>
	    <%= link_to_function( image_tag( p.image.url( :small_thumb ), :alt => p.image.name ), "select_image(this)" )%>
    <% else%>
	    <%= link_to p.original_file_name, p.original.url, :onclick => "select_thumb(this);return false;"%>&nbsp;&nbsp;&nbsp;
    <% end%>
</li>
<% end %>
</ul>
<br style="clear:both;" />
<div style="float:right;margin-bottom:10px;">
<%= will_paginate @attachments, :class => "pagination", :previous_label => "&laquo; previous",  :next_label => "next &raquo;", :renderer => 'RemoteLinkRenderer' %>
</div>
<% else %>
No <%= params[ :media ]%> Uploaded Yet.
<% end %>
